package org.dromara.common.core.utils;

import org.dromara.common.core.exception.ServiceException;

/**
 * @author: zhou shuai
 * @date: 2024/10/6 10:59
 * @version: v1
 */
public class AssertUtils {

    /**
     * 断言为true,若不为true抛出ServiceException类型异常
     *
     * @param: condition
     * @param: msg
     */
    public static void assertTrue(boolean condition, String msg) {
        if (!condition) {
            throw new ServiceException(msg);
        }
    }

}
